//
//  TODrawerTableViewCell.m
//  B段项目
//
//  Created by dllo on 15/12/23.
//  Copyright © 2015年 张智超. All rights reserved.
//

#import "TODrawerTableViewCell.h"

@implementation TODrawerTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubView];
    }
    return self;
}

-(void)createSubView{
    
    //图标
    self.logoImageView = [[UIImageView alloc]init];
    self.logoImageView.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.logoImageView];
    
    [_logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(self.contentView.mas_left).offset(30);
        make.top.mas_equalTo(self.contentView.mas_top).offset(self.contentView.bounds.size.height*0.25);
        make.width.height.mas_equalTo(self.contentView.mas_height).multipliedBy(0.5);
    }];
    
    
    
    //菜单名
    self.menuLabel = [[UILabel alloc] init];
    self.menuLabel.textColor = [UIColor  colorWithRed:0.57 green:0.57 blue:0.57 alpha:1];
    self.menuLabel.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.menuLabel];
    
    [_menuLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(self.logoImageView.mas_right).offset(30);
        make.top.mas_equalTo(self.logoImageView.mas_top);
        make.width.mas_equalTo(self.contentView).multipliedBy(0.5);
        make.height.mas_equalTo(self.logoImageView);
    }];
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
